/**
 * 
 */
package com.antilia.infomaresme.pages.edit;

import org.apache.wicket.Component;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;

import com.antilia.infomaresme.IProtectedPage;
import com.antilia.infomaresme.data.dataobjects.Item;
import com.antilia.infomaresme.pages.BasePage;
import com.antilia.infomaresme.pages.LogedAsPanel;
import com.antilia.infomaresme.pages.TitlePanel;


/**
 * @author Ernesto
 *
 */
public class EditItemPage extends BasePage implements IProtectedPage {

	private static final long serialVersionUID = 1L;	
	
	public EditItemPage(Item item) {
		EditItemPanel categories = new EditItemPanel("edit", item);
		add(categories);
	}
	

	/**
	 * 
	 */
	public EditItemPage(IModel<Item> model) {
		EditItemPanel categories = new EditItemPanel("edit", model);
		add(categories);
	}
	
	@Override
	protected Component newRightPanel(String id) {
		return new LogedAsPanel(id);
	}
	
	@Override
	protected Component newTopMavigation(String id) {
		return new TitlePanel(id, new ResourceModel("editItemsPage"));
	}
}
